﻿package ygg.encoding.swf
{
	import flash.geom.Rectangle;
	import flash.utils.ByteArray;
	
	public class SwfHeader
	{
		//static public var MAGIC_NUMBER:uint = 0x00bf;
		//static public var SIGNATURE:String = 'TCSO';// + String.fromCharCode(0x00, 0x04, 0x00, 0x00, 0x00, 0x00);
		
		private var _version:uint;
		private var _fileLength:uint;
		private var _frameSize:Rectangle;
		private var _frameRate:Number;
		private var _frameCount:uint;
		
		
		public function SwfHeader( version:uint, fileLength:uint, frameSize:Rectangle, frameRate:Number, frameCount:uint )
		{
			_version = version;
			_fileLength = fileLength;
			_frameSize = frameSize;
			_frameRate = frameRate;
			_frameCount = frameCount;
		}
		public function toString():String
		{
			return 'SwfHeader:\n' + _version + ' ' + _fileLength + ' ' + _frameSize + ' ' + _frameRate + ' ' + _frameCount;
		}
		
		public function get version():uint { return _version; }
		
		public function set version(value:uint):void
		{
			_version = value;
		}
		
		public function get fileLength():uint { return _fileLength; }
		
		public function set fileLength(value:uint):void
		{
			_fileLength = value;
		}
		
		public function get frameSize():Rectangle { return _frameSize; }
		
		public function set frameSize(value:Rectangle):void
		{
			_frameSize = value;
		}
		
		public function get frameRate():Number { return _frameRate; }
		
		public function set frameRate(value:Number):void
		{
			_frameRate = value;
		}
		
		public function get frameCount():uint { return _frameCount; }
		
		public function set frameCount(value:uint):void
		{
			_frameCount = value;
		}
		
		
		
	}
	
}